package com.example.websocket.service;

import com.example.websocket.dao.UserMapper;
import com.example.websocket.model.table.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
	private UserMapper userMapper;

    public int insertUser(User record){
        return userMapper.insertUser(record);
    }

    public User findUser(User record){
        return userMapper.findUser(record);
    }

    public int updateUser(User record){
        return userMapper.updateUser(record);
    }

    public int countUser(User record){
        return userMapper.countUser(record);
    }

    public List<User> findUserList(User record){
        return userMapper.findUserList(record);
    }

    public int deleteUserById(String id){
        return userMapper.deleteUserById(id);
    }
}